//base
export const update_loading = ( {dispatch}, loading ) => {
  dispatch('UPDATE_LOADING', loading)
}
export const update_direction = ( {dispatch}, direction ) => {
  dispatch('UPDATE_DIRECTION', direction)
}

//address
export const update_linkname = ( {dispatch}, linkname ) => {
  dispatch('UPDATE_LINKNAME', linkname)
}
export const update_linkmobile = ( {dispatch}, linkmobile ) => {
  dispatch('UPDATE_LINKMOBILE', linkmobile)
}
export const update_building = ( {dispatch}, building ) => {
  dispatch('UPDATE_BUILDING', building)
}
export const update_builderId = ( {dispatch}, builderId ) => {
  dispatch('UPDATE_BUILDERID', builderId)
}
export const update_floorNo = ( {dispatch}, floorNo ) => {
  dispatch('UPDATE_FLOORNO', floorNo)
}
export const update_detail = ( {dispatch}, detail ) => {
  dispatch('UPDATE_DETAIL', detail)
}
export const update_is_new_address = ( {dispatch}, isNewAddress ) => {
  dispatch('UPDATE_IS_NEW_ADDRESS', isNewAddress)
}
export const update_address = ( {dispatch}, address ) => {
  dispatch('UPDATE_ADDRESS', address)
}
export const update_all_to_empty = ( {dispatch}, content ) => {
  dispatch('UPDATE_ALL_TO_EMPTY', content)
}
export const update_address_click = ( {dispatch}, addressClick ) => {
  dispatch('UPDATE_ADDRESS_CLICK', addressClick)
}

//coupon
export const set_aCouponList = ( {dispatch}, aCouponList ) => {
  dispatch('SET_ACOUPONlIST', aCouponList)
}
export const set_uCouponList = ( {dispatch}, uCouponList ) => {
  dispatch('SET_UCOUPONlIST', uCouponList)
}
export const set_CouponList = ( {dispatch}, CouponList ) => {
  dispatch('SET_COUPONlIST', CouponList)
}
export const update_couponlist_to_empty = ( {dispatch}, content ) => {
  dispatch('SET_COUPONLIST_TO_EMPTY', content)
}
export const set_couponLoading = ( {dispatch}, couponLoading ) => {
  dispatch('SET_COUPONLOADING', couponLoading)
}
export const set_couponClick = ( {dispatch}, couponClick ) => {
  dispatch('SET_COUPONCLICK', couponClick)
}
export const set_selectedCoupon = ( {dispatch}, selectedCoupon ) => {
  dispatch('SET_SELECTEDCOUPON', selectedCoupon)
}

//order
export const set_orderInfo = ( {dispatch}, orderInfo ) => {
  dispatch('SET_ORDERINFO', orderInfo)
}

//variable
export const set_openid = ( {dispatch}, openid ) => {
  dispatch('SET_OPENID', openid);
}

export const set_detailActivitys = ( {dispatch}, detailActivitys ) => {
  dispatch('SET_DETAILACTIVITYS', detailActivitys);
}

export const set_showBigGift = ( {dispatch}, showBigGift ) => {
  dispatch('SET_SHOWBIGGIFT', showBigGift);
}

export const set_selectAddressStatus = ( {dispatch}, selectAddressStatus ) => {
  dispatch('SET_SELECTADDRESSSTATUS', selectAddressStatus);
}

export const set_bigGift = ( {dispatch}, bigGifts ) => {
  dispatch('SET_BIGGIFT', bigGifts);
}

export const set_QRCodeId = ( {dispatch}, QRCodeId ) => {
  console.log("设置："+QRCodeId)
  dispatch('SET_QRCODEID', QRCodeId);
}
